package com.youkeda.DesertCamel.controller;

import com.youkeda.DesertCamel.model.MeetingRoomParam;
import com.youkeda.DesertCamel.model.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class MeetingRoomController {

    @Autowired
    private MeetingRoomService meetingRoomService;

    /**
     * 获取获取会议室信息
     * @param meetingRoomParam
     * @return
     */
    @RequestMapping(value = "/meetingroom/getInfo", method = RequestMethod.POST)
    public Result getMeetingRoomInfo(@RequestBody MeetingRoomParam meetingRoomParam) {
        Result result = new Result();
        if(meetingRoomParam != null){
            result = meetingRoomService.getMeetingRoomInfo(meetingRoomParam.getMeetingRoomId());
        }else{
            result.setSuccess(false);
        }
        return result;
    }
}
